home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet internetowy / Czytniki RSS / RSS Bandit 1.3.0.42 / RssBandit Installer.msi / _172FF5180BC61D3C6D240F14338A23AA / _B240D20C20DC45EDBE49B81C4A07532B < prev    next >
Text File  |  2004-12-23  |  11KB  |  269 lines

  1.         <xsl:stylesheet version='1.0' 
  2.                 xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
  3.                 xmlns:content = 'http://purl.org/rss/1.0/modules/content/'
  4.                 xmlns:xhtml='http://www.w3.org/1999/xhtml'
  5.                 xmlns:slash='http://purl.org/rss/1.0/modules/slash/'
  6.                 xmlns:dc='http://purl.org/dc/elements/1.1/' 
  7.                 exclude-result-prefixes='content slash dc'>
  8.           
  9.           <xsl:output method='xml' indent='yes' /> 
  10.  
  11.           <!-- channel group newspaper -->
  12.           <xsl:template match="newspaper[@type='group']">
  13.             <html>
  14.               <head>
  15.             <title><xsl:value-of select='title'/></title>
  16.             <!-- <base href="{//channel/link}" /> -->
  17.             <style><![CDATA[
  18.             body    { 
  19.             background: #FFFFFF;
  20.             font-family:Verdana;Arial; 
  21.             font-size:11pt; 
  22.             margin:0pt; 
  23.             padding:0pt; }
  24.  
  25.             .headTable {
  26.             font-family:"Times New Roman", Times, serif;
  27.             Arial;
  28.             color:#990000;
  29.             cell-padding:2pt;
  30.             background:#FFFFFF;
  31.             border-bottom: 1px dashed #666666;
  32.             padding: 5px;
  33.             }
  34.             
  35.             .title        {
  36.             font-size:14pt;
  37.             font-weight: normal;
  38.             font-family: "Times New Roman", Times, serif;
  39.             text-decoration: underline;
  40.             color: #990000;
  41.             }
  42.             .date        { font-size:9pt; }
  43.             div.content {
  44.             font-family:Verdana, Arial;
  45.             font-size:10pt;
  46.             margin:10pt;
  47.             padding:5pt;
  48.             background-color: #FFFFFF; }
  49.  
  50.             a:link      { color:#990000;text-decoration:none;font-weight:normal; }
  51.             a:visited   { color:#990000;text-decoration:none; }
  52.             a:hover         { color:#FF0000;text-decoration:underline;font-weight:normal; }
  53.             
  54.             ]]></style>
  55.             <style type="text/css">
  56.               <!--
  57.               .channel {
  58.               font-family: "Times New Roman", Times, serif;
  59.               font-size: 10pt;
  60.               color: #990000;
  61.               }
  62.               -->
  63.             </style>
  64.               </head>
  65.               <body>
  66.             <xsl:for-each select='//channel'>
  67.               <xsl:variable name='channeltitle'><xsl:value-of select='current()/title' /></xsl:variable>
  68.               <xsl:variable name='channellink'><xsl:value-of select='current()/link' /></xsl:variable>
  69.               <xsl:variable name='channeldesc'><xsl:value-of select='current()/description' /></xsl:variable>
  70.             <xsl:for-each select='current()//item'>
  71.               <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="headTable">
  72.                 <tr> 
  73.                   <td valign="bottom" class="title"><span class="title"><xsl:value-of disable-output-escaping='yes' select='current()/title' /></span></td>
  74.                   <td align="right" valign="bottom" class="channel"><a href='{$channellink}' title='{$channeldesc}'><xsl:value-of disable-output-escaping='yes'  select='$channeltitle'/></a></td>
  75.                 </tr>
  76.               </table>
  77.               <div class='content'><b><xsl:value-of select='current()/pubDate' /></b><br/> <xsl:choose> <xsl:when test='current()/xhtml:body'> <xsl:copy-of select='current()/xhtml:body'/> 
  78.               </xsl:when> <xsl:when test='current()/content:encoded'> <xsl:value-of  disable-output-escaping='yes' select='current()/content:encoded'/> 
  79.               </xsl:when> <xsl:otherwise> <xsl:value-of disable-output-escaping='yes' select='current()/description'/> 
  80.               </xsl:otherwise> </xsl:choose> <br/>
  81.               <br/>
  82.               <a href='{current()/link}'>Read on...</a> <xsl:if test='current()/comments'> <xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text> 
  83.               <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of  disable-output-escaping='yes' select='current()/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text> 
  84.               <xsl:value-of select='current()/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>    
  85.             </xsl:if> 
  86.               </div>
  87.             </xsl:for-each>
  88.           </xsl:for-each>
  89.             </body></html>
  90.           </xsl:template>
  91.  
  92.  
  93.           <!-- channel newspaper -->
  94.           <xsl:template match="newspaper[@type='channel']">
  95.             <html>
  96.               <head>
  97.             <title><xsl:value-of select='//channel/title'/></title>
  98.             <base href="{//channel/link}" />
  99.             <style><![CDATA[
  100.             body    { 
  101.             background: #FFFFFF;
  102.             font-family:Verdana;Arial; 
  103.             font-size:11pt; 
  104.             margin:0pt; 
  105.             padding:0pt; }
  106.  
  107.             .headTable {
  108.             font-family:"Times New Roman", Times, serif;
  109.             Arial;
  110.             color:#990000;
  111.             cell-padding:2pt;
  112.             background:#FFFFFF;
  113.             border-bottom: 1px dashed #666666;
  114.             padding: 5px;
  115.             }
  116.             
  117.             .title        {
  118.             font-size:14pt;
  119.             font-weight: normal;
  120.             font-family: "Times New Roman", Times, serif;
  121.             text-decoration: underline;
  122.             color: #990000;
  123.             }
  124.             .date        { font-size:9pt; }
  125.             div.content {
  126.             font-family:Verdana, Arial;
  127.             font-size:10pt;
  128.             margin:10pt;
  129.             padding:5pt;
  130.             background-color: #FFFFFF; }
  131.  
  132.             a:link      { color:#990000;text-decoration:none;font-weight:normal; }
  133.             a:visited   { color:#990000;text-decoration:none; }
  134.             a:hover         { color:#FF0000;text-decoration:underline;font-weight:normal; }
  135.             
  136.             ]]></style>
  137.             <style type="text/css">
  138.               <!--
  139.               .channel {
  140.               font-family: "Times New Roman", Times, serif;
  141.               font-size: 10pt;
  142.               color: #990000;
  143.               }
  144.               -->
  145.             </style>
  146.               </head>
  147.               <body>
  148.                 <table height="100%" width="100%">
  149.               <tr>
  150.                 <td height="100%" width="100%" valign="top">
  151.                   <xsl:if test="//channel/image">
  152.                 <div style="FLOAT: right">
  153.                   <a href="{//channel/image/link}" title="{//channel/image/title}"><img src="{//channel/image/url}"  alt="{//channel/image/title}" border="0">
  154.                   <xsl:if test="//channel/image/width!=''"><xsl:attribute name="width"><xsl:value-of select="//channel/image/width"/></xsl:attribute></xsl:if>
  155.                   <xsl:if test="//channel/image/height!=''"><xsl:attribute name="height"><xsl:value-of select="//channel/image/height"/></xsl:attribute></xsl:if>
  156.                   </img></a>
  157.                 </div>
  158.                   </xsl:if>    
  159.             <xsl:for-each select='//item'>
  160.               <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="headTable">
  161.                 <tr> 
  162.                   <td valign="bottom" class="title"><span class="title"><xsl:value-of disable-output-escaping='yes' select='current()/title' /></span></td>
  163.                   <td align="right" valign="bottom" class="channel"><xsl:value-of disable-output-escaping='yes'  select='current()/category'/></td>
  164.                 </tr>
  165.               </table>
  166.               <div class='content'><b><xsl:value-of select='current()/pubDate' /></b><br/> <xsl:choose> <xsl:when test='current()/xhtml:body'> <xsl:copy-of select='current()/xhtml:body'/> 
  167.               </xsl:when> <xsl:when test='current()/content:encoded'> <xsl:value-of  disable-output-escaping='yes' select='current()/content:encoded'/> 
  168.               </xsl:when> <xsl:otherwise> <xsl:value-of disable-output-escaping='yes' select='current()/description'/> 
  169.               </xsl:otherwise> </xsl:choose> <br/>
  170.               <br/>
  171.               <a href='{current()/link}'>Read on...</a> 
  172.                 <xsl:choose>
  173.               <xsl:when test='current()/comments'> <xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text> 
  174.               <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of  disable-output-escaping='yes' select='current()/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text> 
  175.               <xsl:value-of select='current()/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>    
  176.             </xsl:when> 
  177.             <xsl:when test='current()/slash:comments'>
  178.               <xsl:value-of select='current()/slash:comments'/> Comments...    
  179.             </xsl:when> 
  180.           </xsl:choose>
  181.               </div>
  182.             </xsl:for-each>
  183.                 </td>
  184.               </tr>
  185.                 </table>
  186.             </body></html>
  187.           </xsl:template>
  188.  
  189.           <!-- single news item -->
  190.           <xsl:template match="newspaper[@type='newsitem']">
  191.             <html>
  192.               <head>
  193.             <title><xsl:value-of select='//item/title'/></title>
  194.             <base href="{//item/link}" />
  195.             <style><![CDATA[
  196.             body    { 
  197.             background: #FFFFFF;
  198.             font-family:Verdana;Arial; 
  199.             font-size:11pt; 
  200.             margin:0pt; 
  201.             padding:0pt; }
  202.  
  203.             .headTable {
  204.             font-family:"Times New Roman", Times, serif;
  205.             Arial;
  206.             color:#990000;
  207.             cell-padding:2pt;
  208.             background:#FFFFFF;
  209.             border-bottom: 1px dashed #666666;
  210.             padding: 5px;
  211.             }
  212.             
  213.             .title        {
  214.             font-size:14pt;
  215.             font-weight: normal;
  216.             font-family: "Times New Roman", Times, serif;
  217.             text-decoration: underline;
  218.             color: #990000;
  219.             }
  220.             .date        { font-size:9pt; }
  221.             div.content {
  222.             font-family:Verdana, Arial;
  223.             font-size:10pt;
  224.             margin:10pt;
  225.             padding:5pt;
  226.             background-color: #FFFFFF; }
  227.  
  228.             a:link      { color:#990000;text-decoration:none;font-weight:normal; }
  229.             a:visited   { color:#990000;text-decoration:none; }
  230.             a:hover         { color:#FF0000;text-decoration:underline;font-weight:normal; }
  231.             
  232.             ]]></style>
  233.             <style type="text/css">
  234.               <!--
  235.               .channel {
  236.               font-family: "Times New Roman", Times, serif;
  237.               font-size: 10pt;
  238.               color: #990000;
  239.               }
  240.               -->
  241.             </style>
  242.               </head>
  243.               <body>
  244.             <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="headTable">
  245.               <tr> 
  246.                 <td valign="bottom" class="title"><span class="title"><xsl:value-of disable-output-escaping='yes' select='//item/title' /></span></td>
  247.                  <td align="right" valign="bottom" class="channel"><xsl:value-of disable-output-escaping='yes'  select='//item/category'/></td>
  248.               </tr>
  249.             </table>
  250.             <div class='content'><b><xsl:value-of select='//item/pubDate' /></b><br/> <xsl:choose> <xsl:when test='//item/xhtml:body'> <xsl:copy-of select='//item/xhtml:body'/> 
  251.             </xsl:when> <xsl:when test='//item/content:encoded'> <xsl:value-of  disable-output-escaping='yes' select='//item/content:encoded'/> 
  252.             </xsl:when> <xsl:otherwise> <xsl:value-of disable-output-escaping='yes' select='//item/description'/> 
  253.             </xsl:otherwise> </xsl:choose> <br/>
  254.             <br/>
  255.             <a href='{//item/link}'>Read on...</a> 
  256.             <xsl:choose>
  257.   <xsl:when test='//item/comments'> <xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text> 
  258.   <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of  disable-output-escaping='yes' select='//item/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text> 
  259.   <xsl:value-of select='//item/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>    
  260.   </xsl:when> 
  261.    <xsl:when test='//item/slash:comments'>
  262.     <xsl:value-of select='//item/slash:comments'/> Comments...    
  263.   </xsl:when> 
  264.   </xsl:choose>            
  265.             </div>
  266.             <p><xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text></p>
  267.             </body></html>
  268.           </xsl:template>
  269.         </xsl:stylesheet>